/**

   @author : Ferron Smith
   @lastModified: 5/25/2011
   @release : 0.1

    Relase v0.1 
  * Addded functonalitu to retrieve json object and create image tags
  * Runs nivoSlider upon success

**/


// The following function retrieves a json object and create img tags 
function getImages() {
		jQuery.getJSON("photo_finder.php", function(data) {
			var fldr = "images/slideshow/";
			if(data){ //check if any data is returned
				jQuery.each(data, function(key,val) {
				//		console.log(val);
				jQuery("#slider").append('<img src="' + fldr + val + '" alt="" title="#htmlcaption"/>');
				});
			}		
			else {
				console.log("Aw Snap! : Something went wrong loading the images");
			}
		
		}).success(function(){ $('#slider').nivoSlider();});

}